package com.rbac.application.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.rbac.domain.dto.query.RolePageQuery;
import com.rbac.domain.dto.request.RoleCreateRequest;
import com.rbac.domain.dto.request.RoleUpdateRequest;
import com.rbac.domain.entity.Role;

import java.util.List;

public interface RoleService extends IService<Role> {

    IPage<Role> pageRoles(RolePageQuery query);

    Role createRole(RoleCreateRequest request);

    Role updateRole(RoleUpdateRequest request);

    void deleteRole(Long id);

    void deleteBatchRoles(List<Long> ids);

    Role getRoleWithPermissions(Long id);

    void assignPermissions(Long roleId, List<Long> permissionIds);

    List<Role> getRolesByUserId(Long userId);

    List<Role> getAllEnabledRoles();
}